using MediatR;
using RBAC.Domain.Dto.Output;
using RBAC.ErrorCode;

namespace RBAC.Read.Api.Application.Command.ERP.MaterialFile
{
    /// <summary>
    /// 获取物料分页列表查询命令
    /// 支持物料编码、物料名称文本查询和分类筛选
    /// </summary>
    public class GetMaterialPageCommand : IRequest<APIResult<APIPaging<GetMaterialListDto>>>
    {
        /// <summary>
        /// 当前页码，默认1
        /// </summary>
        public int PageIndex { get; set; } = 1;

        /// <summary>
        /// 每页记录数，默认20
        /// </summary>
        public int PageSize { get; set; } = 20;

        /// <summary>
        /// 物料编码模糊查询
        /// </summary>
        public string? MaterialCode { get; set; }

        /// <summary>
        /// 物料名称模糊查询
        /// </summary>
        public string? MaterialName { get; set; }

        /// <summary>
        /// 物料分类ID，用于树状图节点筛选
        /// </summary>
        public long? TypeId { get; set; }
    }
}